home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / dosguide.exe / HELPDOS.ZIP / DIR.HLP < prev    next >
Text File  |  1987-05-18  |  5KB  |  117 lines

  1. -------------------------  DIR - Internal DOS Command  -------------------------
  2.  
  3. DIR displays directory information for a file or files.  The disk volume
  4.    identification, directory path, and number of free bytes on the disk are
  5.    displayed.  The name of each file matching the specified criteria is
  6.    displayed along with its size and the time and date it was last written.
  7.  
  8. FORMAT:   DIR [d:][path][filename[.ext]][/P][/W]
  9.  
  10. REMARKS:
  11.  
  12.    d:       - the drive containing the directory to be displayed.  If omitted,
  13.               the default drive is assumed.
  14.    path     - the directory to be searched.  If omitted, the current directory
  15.               is assumed.
  16.    filename - the filename of the file or files whose directory information is
  17.               to be displayed.  Global characters (* and ?) are allowed.
  18.    .ext     - the filename extension of the file or files whose directory
  19.               information is to be displayed.  Global characters (* and ?) are
  20.               allowed.
  21.    /P       - Pause.  Halts the display when the screen is full.  Pressing any
  22.               key continues the display.
  23.    /W       - Width.  Gives a wide display, listing only the directory names and
  24.               filenames/extensions.  Each line will display five names.
  25.  
  26.    If no filename/extension is given, DIR assumes all files (same as *.*).
  27.  
  28.    Hidden files, such as DOS system files, will not be listed.
  29.  
  30.    The following is an example of a DIR display.  The line numbers are added for
  31.    reference in the explanation below:
  32.  
  33.       1     Volume in drive A is MYDISK
  34.       2     Directory of A:\BUDGET
  35.  
  36.       3     FILE1     DAT       504    4-15-85   10:22a
  37.  
  38.       4                 1 File(s)  320312 bytes free
  39.  
  40.    Line 1 - the drive letter and the disk volume label.
  41.    Line 2 - the directory path.
  42.    Line 3 - the filename, extension, file size (in bytes), and the date and
  43.             time the file was created or last written.
  44.    Line 4 - the number of files in the directory display, and the total bytes
  45.             available for use on the entire disk.
  46.  
  47.  
  48. EXAMPLES:
  49.  
  50. Display directory information for all files in the current directory of the
  51. default drive:
  52.  
  53.           DIR
  54.  
  55.  
  56. Display directory information for all files in the current directory of drive B
  57. and halt the display when the screen is full.  The default drive is A:
  58.  
  59.           DIR B:/P
  60.  
  61.  
  62. Display directory information for all files in the BUDGET directory on the
  63. default drive that have an extension of .DAT.  The current directory is the root
  64. directory.  BUDGET is a subdirectory of the root directory:
  65.  
  66.           DIR BUDGET\*.DAT
  67.  
  68.  
  69. Display directory information for all files in the DATA directory on the default
  70. drive.  DATA is a subdirectory of BUDGET, which is a subdirectory of the root
  71. directory.  The directory path begins with \ (the root directory), so that the
  72. command will work correctly regardless of what directory is current.
  73.  
  74.           DIR \BUDGET\DATA
  75.  
  76.  
  77. SPECIAL USES of DIR:
  78.  
  79. The following examples use "redirection and piping" to perform special
  80. functions.  Note that the commands MORE, FIND and SORT are external DOS
  81. commands.  The command files for these commands must be in the current directory
  82. of the default drive, or, you must have previously issued a PATH command to tell
  83. DOS the drive and directory where the command files can be found.  For brevity,
  84. the examples below do not specify drives letters, paths or filenames.  You may
  85. include them, as needed, when using the following forms.
  86.  
  87.  
  88. DIR > PRN            - print directory listing.
  89.  
  90. DIR > DIRFILE        - write directory listing to file DIRFILE.
  91.  
  92. DIR >> DIRFILE       - append directory listing to file DIRFILE.
  93.  
  94. DIR | SORT           - display directory listing sorted by filename/extension.
  95.  
  96. DIR | SORT /+14      - display directory listing sorted by file size.
  97.  
  98. DIR | SORT /R/+14    - display directory listing sorted by descending file
  99.                        size.  Largest files are listed first.
  100.  
  101. DIR | SORT /+10      - display directory listing sorted by filename extension.
  102.  
  103. DIR | SORT | MORE    - display directory listing sorted by filename/extension
  104.                        and halt when screen is full.
  105.  
  106. DIR | SORT > PRN     - print directory listing sorted by filename/extension
  107.  
  108. DIR | SORT > DIRFILE - write directory listing sorted by filename/extension to
  109.                        file DIRFILE
  110.  
  111. DIR | FIND "5-31-85" - display directory listing for files that were written on
  112.                        5/31/85.
  113.  
  114. DIR | FIND "5-31-85" | SORT > PRN - print directory listing, sorted by
  115.                        filename/extension, for files that were written on
  116.                        5-31-85.
  117.